package com.gmadmin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gmadmin.entity.UnitOrganization;
import com.gmadmin.service.vo.UnitOrganizationVo;

import java.util.List;

public interface UnitOrganizationService extends IService<UnitOrganization> {


    /**
     * 获取组织树
     * @return
     */
     List<UnitOrganizationVo> findOrganizationTree();

    /**
     * 根据用户id查询组织
     * @return
     */
    List<UnitOrganizationVo> getByUserId(Long userId);


    /**
     * 树节点排序
     * @param root
     * @param allList
     * @return
     */
    List<UnitOrganizationVo> getChildNode(Long root, List<UnitOrganizationVo> allList);
}
